﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Portal.Api;

namespace Portal.Modules.ImageBrowser
{
  [AjaxModule()]
  public partial class ModuleImageBrowser : Portal.StateBase.StateContainer<State, StateEvent>
  {
    # region Initialization of the state machine

    static ModuleImageBrowser()
    {
      // Add the available states.
      AddState(State.ShowTumbnails, "StateShowThumbnails.ascx");
      AddState(State.ShowPicture, "StateShowPicture.ascx");
      

      // Add the transitions.
      AddTransition(State.ShowTumbnails, StateEvent.ShowPicture, State.ShowPicture);
      AddTransition(State.ShowPicture, StateEvent.Back, State.ShowTumbnails);
    }

    # endregion


    protected void Page_Load(object sender, EventArgs e)
    {
      LoadCurrentCtrl(IsPostBack);
    }
  }
}
